1 from oxsConfig
import ttk
, W
, E
, fHott
, hottBattery1SourceVar
, hottBattery2SourceVar
, hottCellUndervoltageVar
,\
2 hottMainBatterySourceVar
, hottT1SourceVar
, hottT2SourceVar
4 #define CELL_UNDERVOLTAGE_WARNING 3300 // Warning threshold in mV;
5 #define BATTERY_1_SOURCE ADS_VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
6 #define BATTERY_2_SOURCE ADS_VOLT_2 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
7 #define MAIN_BATTERY_SOURCE ADS_VOLT_3 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
8 #define TEMPERATURE_1_SOURCE VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY , PPM
9 #define TEMPERATURE_2_SOURCE PPM // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY, PPM
12 ttk
.Label(fHott
, text
="Undervoltage warning (in mVolt)").grid(column
= 0, row
=1, padx
= (15,5), pady
=(10,5) , sticky
=('E'))
13 ttk
.Label(fHott
, text
="Based on" ).grid(column
= 1, row
=2, pady
=(30,5) , sticky
=('WE'))
14 ttk
.Label(fHott
, text
="Battery 1" ).grid(column
= 0, row
=3, padx
= (15,5), pady
=(10,5) , sticky
=('E'))
15 ttk
.Label(fHott
, text
="Battery 2" ).grid(column
= 0, row
=4, padx
= (15,5), pady
=(10,5) , sticky
=('E'))
16 ttk
.Label(fHott
, text
="Main battery" ).grid(column
= 0, row
=5, padx
= (15,5), pady
=(10,5) , sticky
=('E'))
17 ttk
.Label(fHott
, text
="Temperature 1" ).grid(column
= 0, row
=6, padx
= (15,5), pady
=(10,5) , sticky
=('E'))
18 ttk
.Label(fHott
, text
="Temperature 2" ).grid(column
= 0, row
=7, padx
= (15,5), pady
=(10,5) , sticky
=('E'))
19 hottCellUndervoltageBox
= ttk
.Entry(fHott
, textvariable
=hottCellUndervoltageVar
, width
='6' )
20 hottCellUndervoltageBox
.grid(column
=1, row
=1, sticky
=('W'), pady
=(10,5 ) )
21 hottBattery1SourceBox
= ttk
.Combobox(fHott
, textvariable
=hottBattery1SourceVar
,
22 values
=('Not sent','VOLT_1', 'VOLT_2', 'VOLT_3' , 'VOLT_4', 'VOLT_5' , 'VOLT_6',
23 'ADS_VOLT_1', 'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4' ),
25 hottBattery1SourceBox
.grid(column
=1, row
=3, pady
=(10,5) ,sticky
=('W') )
26 hottBattery2SourceBox
= ttk
.Combobox(fHott
, textvariable
=hottBattery2SourceVar
,
27 values
=('Not sent','VOLT_1', 'VOLT_2', 'VOLT_3' , 'VOLT_4', 'VOLT_5' , 'VOLT_6',
28 'ADS_VOLT_1', 'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4' ),
30 hottBattery2SourceBox
.grid(column
=1, row
=4, pady
=(10,5) ,sticky
=('W') )
31 hottMainBatterySourceBox
= ttk
.Combobox(fHott
, textvariable
=hottMainBatterySourceVar
,
32 values
=('Not sent','VOLT_1', 'VOLT_2', 'VOLT_3' , 'VOLT_4', 'VOLT_5' , 'VOLT_6',
33 'ADS_VOLT_1', 'ADS_VOLT_2', 'ADS_VOLT_3', 'ADS_VOLT_4' ),
35 hottMainBatterySourceBox
.grid(column
=1, row
=5, pady
=(10,5) ,sticky
=('W') )
36 hottT1SourceBox
= ttk
.Combobox(fHott
, textvariable
=hottT1SourceVar
,
37 values
=('Not sent','VOLT_1', 'VOLT_2', 'VOLT_3' , 'VOLT_4', 'VOLT_5' , 'VOLT_6',
38 'TEST_1', 'TEST_2', 'TEST_3' , 'GLIDER_RATIO' , 'SENSITIVITY' , 'PPM' ),
40 hottT1SourceBox
.grid(column
=1, row
=6, pady
=(10,5) ,sticky
=('W') )
41 hottT2SourceBox
= ttk
.Combobox(fHott
, textvariable
=hottT2SourceVar
,
42 values
=('Not sent','VOLT_1', 'VOLT_2', 'VOLT_3' , 'VOLT_4', 'VOLT_5' , 'VOLT_6',
43 'TEST_1', 'TEST_2', 'TEST_3' , 'GLIDER_RATIO' , 'SENSITIVITY' , 'PPM' ),
45 hottT2SourceBox
.grid(column
=1, row
=7, pady
=(10,5) ,sticky
=('W') )